/*
	Worker.h

	Represents a single worker thread within the snowstormX engine

	Author: Aidan Goddard 7/8/14
*/

#ifndef WORKER_H_INCLUDED
#define WORKER_H_INCLUDED

#include"SnowstormXExports.h"
#include"SnowstormXEntity.h"
#include<Windows.h>
#include<cstdint>

namespace Snowstorm
{
	class Worker
	{
		//////////////////////////////////////////////////
		// internal control stuff
	public:
		static void CreateWorkers(int count);
		static void StopWorkers();

	private:
		static Worker **workers;
		static int worker_count;

	private:
		Worker(int ID);

	public:
		void Stop();
		void Main();

	private:
		int ID;
		HANDLE handle;
		bool stop;
	};
};


#endif